Compiling Scheme to JavaScript
نویسندگان
چکیده
This paper presents SCM2JS a compiler that translates a variant of the Scheme programming language into JavaScript. On the one hand, some Scheme features are missing, amongst which the most important are the lack of support for continuations, the absence of exact numbers, and a partial treatment of tail recursions. On the other hand, some extensions are added for improving the connection between Scheme and JavaScript. In particular, SCM2JS extends Scheme with the JavaScript dot-notation which enables compact class accesses. Scheme code and JavaScript can be mixed because they both access functions and variables of the other language and because they share, at runtime, a common memory. The codes produced by SCM2JS are fast because for most programs they have performance comparable to equivalent hand-written JavaScript programs. Hence, one may use SCM2JS for replacing JavaScript with Scheme. For instance, one may implement web libraries or HTML actions in Scheme. The paper shows how this can be done in context of Hop, a programming language dedicated to interactive web development.
منابع مشابه
Javascript to Scheme Compilation
This paper presents Jsigloo, a Bigloo frontend compiling Javascript to Scheme. Javascript and Scheme share many features: both are dynamically typed, they feature closures and allow for functions as first class citizens. Despite their similarities it is not always easy to map Javascript constructs to efficient Scheme code, and in this paper we discuss the non-obvious transformations that needed...
متن کاملHop Client-Side Compilation
Hop is a new language for programming interactive Web applications. It aims to replace HTML, JavaScript, and server-side scripting languages (such as PHP, JSP) with a unique language that is used for client-side interactions and server-side computations. A Hop execution platform is made of two compilers: one that compiles the code executed by the server, and one that compiles the code executed ...
متن کاملLinks: Web Programming Without Tiers
Links is a programming language for web applications that generates code for all three tiers of a web application from a single source, compiling into JavaScript to run on the client and into SQL to run on the database. Links supports rich clients running in what has been dubbed ‘Ajax’ style, and supports concurrent processes with statically-typed message passing. Links is scalable in the sense...
متن کاملKawa - Compiling Dynamic Languages to the Java VM
Many are interested in Java for its portable bytecodes and extensive libraries, but prefer a different language, especially for scripting. People have implemented other languages using an interpreter (which is slowed), or by translating into Java source (with poor responsiveness for eval). Kawa uses an interpreter only for “simple” expressions; all non-trivial expressions (such as function defi...
متن کاملEnterprise JavaScript with Jangaroo
By compiling ActionScript 3 to JavaScript, the Open Source project Jangaroo lets web developers utilize a superior language for building large scale web applications. Since JavaScript is used as the target language, no browser plug-in is needed to run Jangaroo applications. Jangaroo reuses and provides professional tools supporting the complete software development lifecycle. CoreMedia uses the...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2006